while snippet added