added basic sql code