start to make function instrumentable
allow function to be called without flask