modified postcontroller and routes