simplify the code. make it easy to read and easy to get the result.