added test version, need refactoring and revision