A directed relation graph method for mechanism reduction