added test folders / refactored the code