Added functions for calculating the total length of all guard-traces and for calculating the average length of each guard-trace