Make function sequential