improved code readability and status LED