controller overhaul, handling different HTTP methods