complete initial function