Cleanup
refactored version