add missing include for sleep function
fix variable name