added max level and improved formatting