refactor + reftype changing