Adding some Pseudo code as a wishlist.