finished tr the first pass of phptherightway