Updated Problem 4's this.remaining function