add and fix bug - material
fix bug and add search function