bringing test across. had to write some hacky code to get it to work, need to rework it