Added return type functionality to functions