This is with shoot improved and the register function corrected for errors