Added code to missing functions