using $.Deffered()s and promises for latency