start implement recursive loop