add core part of baseSetFunction