prepare device