added both sorting