working on making the code in the proper format using templates