Adding basic sorting class and dp class