performing pig in the main library