Implemented send command logic