updated library script.