implemented button functions