come corrections and optimisations in code of A4