added correct sql for db