creating a decorator function