updated button methods and fixed widget indexing