A more object-oriented approach