divide process into other method