updated to use promises/a+