added directory creation to simulation