updates puzzle logic