changes to functions for tags