updated version with serial