New more complex version