use type annotations to reuse slice as a function name
move the functions to appear as constructors