deleted old unused methods and changed the fromat of JSON in getState