updated with retreiving from db