done for assignment 4; moved themes to model; added logic to check if flipped/rotated already before solving