modify program so it can be imported