Implement serial function.