last function setting up