added function to find best learning rate and iterations