Add root mean square error function