updated function signatures. broken.