You're overwriting y here. Was that intended?