getting directories correct