initial insert done + adding entry updating code