added previous dojo code