start implementing errorMsg functionality + small fixes