freeb switched to query, but not working properly