Issue #2 fixed ('val' is not defined)

Signed-off-by: sriharsha <helpzuna@gmail.com>