add inheritance and change some formatting