change script to object-oriented design