public static function subMap(&$inputMap, $keyList) {
        $subMap = array();
        foreach ($keyList as $key)
        {
            //check is the map contain the 
            if (array_key_exists($key, $inputMap)){
                $subMap[$key] = $inputMap[$key];
                unset($inputMap[$key]);
            }
        }
        
        return $subMap;
    }