added SQL (working this time)