added promis support