changes and fixes to functions personal