functions && files && some trickies