taking db queries out