added queue change function

Also did some minor fixes