Took Joao's last update and added auto380 correction functions