removed
simplified
removed
uses functions instead objects
refactored