notes on changing wait to callback