fixes #96 - add interface for setting variables
add unit tests