added variable guard impl. resolves #21
added VariableState impl. resolves #20