added, separated, and restructured methods in ktb.rb