Put in the input range checks and rebuilt