made the database query much better