added intial.r and ndean.r