added main.cpp for sorting