refactory pc codes