in the middle of fixing optimizer