Moved logic section.