added further sql code