Changed variable s -> state, a -> arg