Added levels variable to main