Better performCommand util