Added mean test and taking into account different scales