Working much better now (9-action)