undescore templates added, code refactoring