added createSelect function and refactor code and change query convention to  uppercase
 commit for present