New attempt, now a class instead