generalize for kapn - #162