split tagarray code into seperate file