Reindented, added Output rule