added comments and proper documentation
renamed the template