added levels out of name and cleaned up