added serialf function and added serial port selectors