added ability to set level