update chef logic
code cleanup