returning 0 when everything went fine