regularize type checking, incorporate ref shortening