cleaned up sequential program