add castSource option