done adding the snippet to pick k in each class