Added a user entry check and Big O comment.