Simple promise implementation