added finish order functionality