started cleaning logic, tried better use of queue/next, going to investigate deferred
logic code working with deferreds