script to extract features