added modifications to the save method and commentin in aPI