cleaning up the multiple tag code. Not quite there yet