added customScript() method and edited class construct to automatically add a new line