move create and update urls to controller