working on getting ref counting working with alternatives