add storage, query and events