updated promise chanin to use the q library