changed variables to final