extract and transform data