ready to implement maximization algorithm