logic problems solved