master finish
changed sql