removed dynamic cast