Added beat sending code