add refresh button, move network call into its own function