comparing callback and Promise-based approaches for asynchronous programming