[#3] Implement basic dispatched algorithm