Added functions file for means' calculation