Added detect_laptop function.