Add KPS algorithm