added generic to stack