changed routes to respond to get or post