Add bounds and reset code