removed maximize funct