some ruby variables added, mapping for closing brackets and ruby methods