make it work wit the api instead of dumb data