added a placeholder median function, needs to be replaced