need to flesh this function out tomorrow