added test directory
added test directory
more refactoring