modified the script to extract functional annotations