make initPurityAppView take dynamic