Add sharepreference and json for saving data