tidy up example codes