removed dynamicCast that was not required