updated doc strings and comments