repopulated command code in main