can you refactor it so that the ``return false`` is in the ``if`` part?