add logging, factor extended c/r class