minor refactor in oncreate