Undid the changes to functions that was used in run309