complex functions