improved style of the code