renamed stacks method for clarity