Adding the ensure funcionality