with function that retrieves from db