changed some variables to public