integrate kevin's script