fixed behavior of transform and fixed examples
fixed tests
simplified grammar