more vapply() instead of sapply & .sapply
cosmetic in formatting