adding unit test scope.All and little refactoring