finished most logic functionality, working on anonymous function aspects