all logic to check solution is complete