added comments and updated error eval metrics