debugs what $val is