start move to object-oriented code