refine internals