Seperated functions to scripts