added stack structure and code to test it