improve style as per ruby style guide