remove unecessary commands