load up a bimmer "Carly for BMW" scanner tool on a tablet, get the USB cable, and scan it for issues. Save yourself the issues I had. It gives you a lot of good info that I wish I had before I made my purchase... like VANOS solenoid issues.
Do yourself a favor and pull the plastic valve cover and look at the injector part numbers to see if they've been updated. If they haven't been... you WILL be replacing them to the tune of $12-1500.
It's not that bad if you do it yourself. I replaced 3 injectors for $350 total. There is so much info out there on how to do different things with these cars to keep yourself from getting rapped at the dealership