modify app to OOP