Added serial init function