public function castPowers ($casted) {
        $postfixes = array(
            'K' => 1024,
            'M' => 1024 * 1024,
            'G' => 1024 * 1024 * 1024,
        );
        $matches = array();
        if (preg_match('/^([0-9]+)([' . implode('', array_keys($postfixes)) . '])$/', $casted, $matches)) {
            $casted = $matches[1] * $postfixes[$matches[2]];
        }
        return $casted;
    }