Adding functionality to function stubs