reverting because SQL query doesnt work