I try to optimise the code but got an error "Unresolved reference" in line 17 and 19. Can anyone help me to resolve this.