fixing bugs and adding triple tag