fixing bugs/errors