Improved r3v's suggestion