Using getattr to resolve commands