move these helper functions into utils for use in other modules
add support for element/:id/element(s) and tests