typecast with scope