fix broken code (move to app)