added subs, subocts functions