moved button declaration