fixed Kevin's kstar method