refactor again for simplification