removed private declaration
some refactoring