finished Median Cut Algorithm, need testing later; close #1