refactored self fusion,added gibbs to pySelfFusion