sql class and major changes added