moved filter for magic outside loop