finished all algorithm methods, need to errorcheck counting