changed the hatcommand working methods