updated indent and pgrid routines