added new scriptfunction feature