new swift code and queue toggle