Updating functions to return directly