script for while sample