Code done in dojo