changed variables to private