added trailingSlash() method