core function was wraped