fixed orphan bug, updated variable structure

see process book apr 24 andrew