resolves #14: save device id in database