resourse files with higher order functions