fixed sorting issue and re-arranged the info displayed in tables