adding sorting stuff