type casting only for non-internal calls