extracted Stack interface and renamed implementation to BoundedStack