little refactor to simplify the all_avaliable_templates method