stacks/builds refactoring