record calls to a function and replay it back when needed-during tests for example