a grab bag of sorted code