Further simplified the example: Removed unnecessary variables