Program can now handle buffer overflows and underflows