code example to demo how to register custom scheme