Refactor transfer thread to a separated method