implemented cors and made other changes