First version. TODO: remake replications with messages