Easy, but nice and very useful :)
I did something like this in a game of mine, not long ago
good one!