reference error hopefully fixed