updated script for Code