rename function name
refactor code