improve code for clarity