finished builtin_cmd function