implemented localOnly option