moved button functions to respective class files