updates and fixes... working on full implementation