added input detection, simplified actions and actors