cleared up reference issues