reopen simon's PR that I reverted

This reverts commit 01e44919990a18d034aae73c6c392b7c7c528381.

Reopens https://github.com/dimagi/commcare-hq/pull/440