Optimized automatic procedure for Mw estimation of regional seismic events