fix type of endpoint
many changes