Added a while snippet