added remaining functions; buttons need more care...