refractor code.
refractor code.