code style adjusted according to comments from JakeWharton in pullRequest #20