getting closer, almost have refcounting working with alternatives