minor change
updated api functions calls in masktest
continued working on hrefficiency, not working yet
added required interger conversion to max and min functions
cleanup
consistent variable assignment