updated source from Joe/Monica & fixes from prev version included