apply not sapply.