refactored callback and handle from native