Added return ability to functions