added comments, and created sample insert into db method