continued fix (not finished)