nit: consider putting parens around the equality check for better readability.