Working changes to functions