enhanced frontend logic, added item persistence feature