Refactoring for simpler approach
Simplificaiton refactor complete, not tested