moved pinpoint code to library project