1.implement join function
2.seperate class file