levels support

partial code