a bit of refactoring
removing logging info