implement core functions