added mocks
fixed mixed error/err var names