Removed . in front of lapply arguments, was being confused as function