refactor, neater query, readme