made device Id as a parameter