Reverted vincents solution