cleaned up
refactored