Increase speed of the new API

Thanks for the advice, I have already applied it