made formatting changes; added return to finish function