completed core functions