simplification of the code.