modifies wrong function