That should do it.  However, sorting might not be quite as nice if you need to sort.