new functions for promises as well as a bugfix in storage.