https://medium.com/better-programming/be-the-master-of-the-event-loop-in-javascript-part-3-df51ab655c94