refactor -- move class to seprate file.