shitty level set code