Added docblock and made final part of if statement a default