implement ref keyword on cases for mutables