refactored your products controller to be more DRY. added comments