add error handling for rest point