Using script to integrate custom code