huge changes, decorator function added