added queue mechanism