api integration
working version without weights