hooks for device