reason out Y from recursive function