Writing a pair of functions from stubs