raise NotImplementedError if not implemented