using preLayer script with arguments