trying to get optimizer to work