improved class field and tests