Setting up first crucial functions