hopefully reduced duplication for codeclimate