updated & tested impute script