promise syntax with no jquery