added sorting, new for is partial