added command handling and updated domain