made OOP version

added comport changing