Added function declarations. Yet to be tested through compiler