added prototypes for 2D and 1D