updated refactor v0