added changes for sql stmt