shorten the code and add some useful results