added nscoder serialization for cgrects