almost done - wacky

added comments and cleaned up code