moved functions inside of multitask