made a stable version for showing in class