alert match inside if