Given the following context:

A janitor is seen cleaning in a laboratory and interrupting a scientist as he asks to clean the floors of the area he is working in. The scientist agrees and retreats to the hallway to a vending machine. The janitor accidentally knocks off a life monitor attached to a man, in his attempt to revive the man he gives chest compresses but his hands rip through the flesh as the man awakens and attacks the janitor. Moments later the janitor attacks the scientist in the hallway.

answer the following question:

What was the janitor doing just before he attacked the scientist? 

chest compresses