working copy. needs cleaning
everything except set arithmetic working