updated comments, made recursive helpers consistent