May be we should put this inside the if block to avoid creating garbage