added sapply