layout (front end) mostly done