now takes only one callback and set error