fixed failing code