avoid nested logically nested functions
avoid nested logically nested functions

switchinnovations/pxt,playi/pxt,switchinnovations/pxt,Microsoft/pxt,switch-education/pxt,Microsoft/pxt,playi/pxt,Microsoft/pxt,switchinnovations/pxt,Microsoft/pxt,playi/pxt,switch-education/pxt,switch-education/pxt,switch-education/pxt,Microsoft/pxt,playi/pxt,switch-education/pxt,switchinnovations/pxt