convert to rest, fix persistance