sorted columns correctly
added more functionanlit