refactor access; fix bug with updating accounts