Submits to db properly