trying to call apply() to print results