improved button row code a bit