add setup, add comments, refactor function names

3 jobs for master