refine functions
refine functions