generic stack script