restoring constructor to template