Added a simple promise function