Added 3 button function