add a method for storing lexicographically sorted longs in slice