mostly done with vapply and tapply lesson