implemented Class_template and Object_template
refactoring around function calling