building puzzle class