example script for extracting data