added return to functions