use class instead of object with full simple solver example