re-write some pm start code.