we need last value http://ideone.com/wqf0xp