starting to have some query working