determine iterations depending on lambda