changed stack to a list