restoring position and class