modify queue method