Adding courses moved to the function