Updated function excerpt script