adding additional documentation, and additional stack implementation code