added method that checks duplicate entry

to be called before adding. Do not allow duplicate entries