used resources in router, added edit function, db saves not working