add lower function for sql