change architecure, we need to know if app is instanceof Cosmos