added test method
some printing added