inspired by https://github.com/play/play