applied changes suggested by rubymine