fixing composite factors from lambda to a function