place retrieve templated code inside the class