merged code from previous commit with new changes to defs (value) and sym (minor fixes)