final bug fixes; works in udacity grader now