added generic compKRs function