refactor members controller