res-functions changed, overloaded printValue added