fixes && updates to gap stat (corrected math for optimal number of clusters)