added SQL changes