made it async using fetch/await