made button listener more compact