improved Promise
fixed POST and GET requests