One possible solution (estimated implementation time ~30 minutes)