Removed redundant x^1 and slightly changed output