updated tutorial code for moving strings