Updated functions to pass as first class values