refactor popup button into its own class