modfied example of rest.