finally finished sql changes