small correction for optimithation