Refactor with include tag and improve generic