write hybridiation function