added some order generation func