adding database smpl code