made some variables const