dividing of GUI code