state conversion script added
fixed a recursion