some algorithm development