ajax for adding to db
merge conflicts fixed: