added addnewentry function