fixed bugs. updated variable selector functionality