implements of some relative algorithms