char version basically done and testing of the sorting in main