new layout and conversion to php