attempting to fix bad function calls