stick to conventions

return -1 in case of error, not 1