small refactoring: changed the optional parameter's name from class to classes; added doc comments