avoid repeat function