moved convenience functions to util