helper functions for html