`val` is unresolved here