change script to function iniscrub()