Added sketch of processActions function.