Algebra dispatcher

merge algebra dispatcher