redesigned and cleaned up
commit