addr is never defined using variable k instead...