add shelve, fix mistakes