another variation, not necessarily cleaner