seems database query is now working