Command fields code that professor posted