making the api actually works and sync its db