bug fixes + local prediction output complete