move more functions off of classes, into functions