Added extract() and shuffle() functions