completed the setup functions