refator function name