made Controller to use promise api for efficiency