added thread functionality; still need to find a way to stop threads to run new command