I'd suggest moving this assignment somewhere else, as the code gets a bit hard to follow because of it.