using lists as  stacks