Added logic in Save method