fixing commands to be asynchronous