added sorting to detail table