commented script and refined process