generalisation to ease adding new commands