made some variables internal