extract get and post methods to seperate controllers