sorted add method is working