add rest factory