functionize everything