working diff with the new representation, next: modify apply to accept the new representation