function fixing