refactored into seperate commands for easier debugging