:+1:  the assetion at the end is the most important bit!