I suggest giving more meaningful name to this variable ("val")