using slf4j instead of old Logger class for logging, refactoring