added frozen bool and bug fixed