I can't figure out why this creates a violation on line 502