Debugged Function5