Rewrite - Object-oriented approach