improve saving/make it work