update to design and adding sql