minor variable changes (renamed function, moved variables into init function)