replace get and save functions