better local only support

and some bugs
now passes self to syncCallback