Simplest answer for 1
Some actual code