progress on level set (starting to work)