added define variable functionality
added tests for define functionality
Merge pull request #16 from Wenqer/master

add define variable functionality