add join for schedulers, rewrite sort