nearly completing insertEntry method