Added device versions of functions.