adjusted code to the new layout file