fixed db and added comments