working on new pid code