rubocoped and tested much better