added genres function, cleaned old code