:+1: for @jonas054's refactoring suggestion.