buil a 3 dimension array