Adler-Gelfand-Dickey approach to classical W-algebras within the theory of Poisson vertex algebras