re-organized code, added tag column