Dennis' inelegancy in coding fixed