remove device parameter
abstract metadata better