added new util class. new tests and new memory function untested