full ps code with all three leaves and all three buds

tested many times till bud transfer I
have to check the integration from bud transfer I till third