added serial init code