Removed parentheses and added unit tests to verify the behavior