added in directory creation for sort out function