using httpparty instead of js