add has_item method an remove unnecessary parameters variable