use logger instead of puts
ruby style guide adherence