added directories and some stuff works-ish