Added getStacks method (continued).