new button implementation;
also added onclick functions.