add Hash to allowed parameters and refactor
simplify specs
fix some rubocop offences