added a good bounds optmization