use sapply() instead of unlist(lapply())