added the correct sql this time