A flexible micro-randomized trial design and sample size considerations