Create Complex function