added first bits of code to the actor.js class