modify queue and process logic