Use device parameter instead of member variable