I got it, and the code is in the pic :)