refactor simplified