added a residual method and updated some cluster options