how can I run two functions sequentially?