making command more conscice and seperating into subtasks