simplify through refactor