partial algorithm implementation
partial algorithm implementation