added max-min cutoff , goal, implemented commands