decorates the function