undid the conditional, doplay inside pageinit