Updated some code
encountered problems with db
merge