- added optimization from gaf3