add doc string, change variable naming