Modified record script