practiced separate the function into the different class.