improved code style for clarity