Adds level function so we can use it in more than one place.