modify resource and add functions to labels and buttons