Added code to the function stubs

Added code to function stubs