added stack, still needs comments