make the code less complex