some changes in sql