improvements according to codeclimate