First approach.
Second approach.