added processing algorithm
some code optimization