simplified vapply statments, removed upper case boolean references.