optimize magic check with evil macro