Added basic code to perform gap statistic