instantiated the cmd_if into the top_level. Added some comments