updated tests and adding level parsing