popup function added for tracking