added toggling of pending