stack passes all tests and is fully functional