Change Hard code by $key, $val