another angle algorithm