re-Debugged Function5