updated with command parsing